package com.example.mylibrary.net;

import android.text.TextUtils;

/**
 * @author mark.liu
 * Created by Administrator on 2016/11/1.
 */
public class UrlConstant {

    public final static String DOMAIN = "http://apidslm.tvpusher.com/api/";//正式环境

    public static final String ROOM_DETAIL = "Home/room_detail.php";
    //电视&广告模式切换
    public static final String ACCEPTHEART = "Home/AcceptHeart";
    //开机上报信息
    public static final String COLLECTEQUIPMENT = "Home/CollectEquipment";
    //版本检测
    public static final String VERSIONCHECK = "Home/VersionCheck";
    //黑屏，控制不能使用
    public static final String BLACKSTATUS = "Home/BlackStatus";
    //获取品牌信息
    public static final String GETBRANDINFOS = "Home/GetBrandInfos";
    //获取应用信息
    public static final String GETAPPLICATIONINFOS = "Home/GetApplicationInfos";
    //获取模板把信息
    public static final String GETTEMPLATE = "Home/GetAllyKeyTemplate";
    //开机广告
    public static final String GETSTARTADS = "Home/GetStartAds";
    //导航
    public static final String GETNAVIGATION = "Home/GetNavigation";
    //热门推荐
    public static final String GETHOTRECOMMENDS = "Home/GetHotRecommends";
    //视频数据
    public static final String GETQTVVIDEOS = "Home/GetQtvVideos";

    //把https更改为http
    public static String getNewUrl(String url) {
        String newUrl = "";
        if (!TextUtils.isEmpty(url)) {
            newUrl = url;
            if (newUrl.contains("https:")) {
                newUrl = newUrl.replace("https:", "http:");
            }
            return newUrl;
        } else {
            return DOMAIN;

        }
    }

    //更改设备类型
    public static final String SET_EQ_TYPE = "Eq/SetEqType";

    //更改设备类型
    public static final String GET_ON_GOING_AD = "FullScreenAd/GetOnGoingAd";

}
